<?php

require('includes/config.php');
/*$conn = mysql_connect("localhost","root","");
mysql_select_db("sandiego",$conn);*/

if(isset($_GET['getCountriesByLetters']) && isset($_GET['letters'])){
	$letters = $_GET['letters'];
	$letters = preg_replace("/[^a-z0-9 ]/si","",$letters);
	//$res = mysql_query("select ID,countryName from ajax_countries where countryName like '".$letters."%'") or die(mysql_error());
	$res = mysql_query("select hdvc_code,hdvc_name from hdv_company where hdvc_code <> 1 AND hdvc_name like '%".$letters."%'") or die(mysql_error());
	#echo "1###select ID,countryName from ajax_countries where countryName like '".$letters."%'|";
	while($inf = mysql_fetch_array($res)){
		echo $inf["hdvc_code"]."###".$inf["hdvc_name"]."|";
	}
		
}
?>